/* 
    所有接口网络请求的方法 
*/
//导入base文件
import base from './base'
//导入网络请求封装request
import axios from '../utils/request'

//定义网络请求方法 属性是一个函数名
const api = {
  /* 
    获取编辑推荐音乐
  */
  getMusic: function () {
    return axios.get( base.music)
  },
  /* 
    获取最新音乐接口
  */
  getNewMusic() {
    return axios.get( base.newMusic)
  },
  /* 
   编辑推荐--进入-音乐列表界面
   传递参数： id:xx
   写法1：
     axios.get('xx/xx?id=xx')
   写法2：
     axios.get('url',{
       params:{
         id:xx
       }
     })
     
     axios.post('url',{})
  */
  getMusicList() {//params={id:xx}
    return axios.post(base.musicList, {
      params:'CsQHZaAx76qRr4PzcOYr2WCuql0zgC8ijtH5GSlwMPwPZU3WzFHk/MtKac6zqAmeuV6yVX8MSdjUrECrcT/bLoq2eeE7+khW1cxE+yFFbU1Gfhsc3IK3dQX05y+ZNYjXl+AiI6x4GQ6NQ7G0j6DWEFPDTUYwwZjk5/5uejKJXgIofT5/u6S6IXGeM0QjmMjw',
      encSecKey:'9b40fe957960711b1b6ad67e4d26cf4a93aee422eb80d401f560efc140b8c91f74405c5c4793422948a719670343c50723ba209176c10085d5c63f0ed490da29c255eb59407ee16158a89f0300aa67cd565a4f1f286209afaea2c6a94a0ada3d810579a9c1330b1f12c75ea1f9778182a2c46fc32a763a7167ab528b9181320b'
    })
  },
  //调用：api.getMusicList({id:xx})
  /* 
  音乐列表界面---评论接口
  */
  getComments() {
    return axios.post( base.comments, {
      params:'hTgP7wWRHKpgNVJbWyhj/SPzIt+0dTbl4Bcd0Ch55iriKOZfBE6/DJ3xpvYwGvby483a+eKv0fBhUGw37N0q4ibwlaVNZC348HEBM/xIWQVe8w738rzPWm7dHJRtDI2fvDJTKyoCS4hci8wEEzXe3Tx3lphjCkY8KcmABXla4QkTlV/ImeDyabl2gSvJ+JHd4jayFC9AGTvcxkz7ICY3gMfE/2B096z7b1Lb7m39HBU=',
      encSecKey:'bea852c187853b65d3af36d81b1d9eb5493bc321fe9293956a3b2eee4ba74ab9d96387a9ee741c9b52888dda41d27bd9f5f101313506f0c2cddae6c2eac17baaf5e29e7d4add5c0a1dc3e9feee5952518573261918ab2425bbe9fc5e1052e5cd3c52ce5d7251f17a6723e54cd182bf9c586692ea0966b871cac3f6329160b3cb'
    })
  },
  /* 
    获取热歌榜
  */
  getHotMusic() {
    return axios.post(base.hotMusic,{
      params:"ZtejLdSL4XFbMx9YCW13Wi+wD5S+L2YRliLqGywliWXXcFg2j5sfIWBlAn6ydNacOBa6GJ4TKhU35TH8mMCAvYPToGrlcAUj3RtMahOJ0wwCcmTknsl3dHIzEyxP8jc6bKAF0X3m5f6Moje9TAXZRg==",
      encSecKey:'884d7bde03d60ef63b5927c5748ffbdf2f358d1a8de0c24f4cc5c616cd7a4fa518a2be21b025123a1b7f9ed694ec3b51c04731baac5f9c5be4c4822d284dcca426549628915af2f6133460298c84f2b189b94da21a01a5c37ed4170b309b496c3e27ab21dcdb510534e1e0491e0e3ec33ee5306337d95e0124265387cf2dbe78'
    })
  },
  /* 
    获取搜索列表热门搜索
  */
 getSearchList(){
   return axios.get(base.searchList)
 },
 /* 
  获取搜索接口
   参数	是	keywords 	string	关键字
  参数	是	type 	string	'mobile' 移动端
 */
getSearch(params){//params={keywords:'',type:'mobile'}
  return axios.get(base.search,{
    params
  })
},

/* 
  获取音乐
*/
getSongUrl(){
  return axios.post(base.songUrl,{
    params:'PbQ3zRFRYMZulEPOckMeHWqe+JYOqCoICzPixS5faEmJSEfq61qNlphAF3lj2on4MEG8fH80CV0MVXyPEoLL4CitosWzukjpP6MQyjWE3SQdYEFw3CUYeRuCpcEeRyTqbKHIo/ocq3XEoRnA+z/D5AbD+MNWqUkuIj4Z3IyJsFBcRjZdCCAPdlByHZYBQj3LI6H/jX91sw5hc6kT31f9IA==',
    encSecKey:'2cb3bb69898213b04cdb23351076cb0db0791c3c85ad3974120c345c9dcd1f670e715703f656870cfccc78c062d1bdb33e8eca89ee7c5d79e56d584d70d4907315f0f2fec1444d81f70abe2ab60c5cdfcfaae0db72a12bae35493f75afea6c22ddedc6f83fa841379d141a69ba26733221d9ec2af59554eafae0817fa95ae84a'
  })
},
/* 
  歌词
*/
getSongText(){
  return axios.post(base.songText,{
    params:"EU3mRqPWK8vGaZwmA8ivdrHnv5xsSvOGRUyir4vIj9ivAI/5GjVy684go0/lhurl3b++0GwRr1h1yqpW/a8BSZrjVUZBGSLoGCb47o7l8Ge53JTSj/ZTJowJafZp+2MjXX2u7LRY1pm32IcRZmLzFA==",
    encSecKey:'2341184c36202825d9d438d218dcd5f4db95cc542b605a6bdd62a56ff60d0fa44497d47cd19cd13dc2e033ca928e58ad87f00a5dff81fc6fa113a169ec9572b0627d569004833a131c9290bd692667531bcb06cc0b2b26ccd0a93467456a26187b7db57e7238adcc3a202008314c20ac7b6b207ffb410dbbf7f1b04287fb9cbe'
  })
}

  
}

export default api


//api.getMusic().then()